package com.aidex.tina.domain;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import lombok.Data;
import com.aidex.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.aidex.common.utils.log.annotation.FieldRemark;
import com.aidex.common.utils.log.annotation.LogField;
import com.aidex.common.annotation.Excel;

/**
 * 供应商管理对象 tina_supplier
 * @author Stanfine
 * @email shanliang@outlook.com
 * @date 2022-06-08
 */
@Data
public class Supplier extends BaseEntity<Supplier>
{
    private static final long serialVersionUID = 1L;

    /** 名称 */
    @Excel(name = "名称")
    @LogField
    @FieldRemark(name = "名称",field = "name")
    private String name;

    /** 类型 */
    @Excel(name = "类型", dictType = "tina_supplier_type")
    @NotBlank(message = "类型不允许为空")
    @LogField
    @FieldRemark(name = "类型",field = "type")
    private String type;

    /** 编号 */
    @Excel(name = "编号")
    @LogField
    @FieldRemark(name = "编号",field = "code")
    private String code;

    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }

    public void setType(String type) 
    {
        this.type = type;
    }

    public String getType() 
    {
        return type;
    }

    public void setCode(String code) 
    {
        this.code = code;
    }

    public String getCode() 
    {
        return code;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("name", getName())
            .append("type", getType())
            .append("code", getCode())
            .append("remark", getRemark())
            .append("id", getId())
            .append("createBy", getCreateBy())
            .append("createDept", getCreateDept())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("updateIp", getUpdateIp())
            .append("version", getVersion())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
